<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="../css/common.css?01_38" />
		<link rel="stylesheet" type="text/css" href="../css/templet.css?01_38" />
		<link rel="stylesheet" type="text/css" href="../fonts/font-awesome.min.css?01_38" />
		<link rel="stylesheet" type="text/css" href="../mui/css/mui.css?01_38" />
		<!--公共js-->
		<script type="text/javascript" src="../common/js/jquery.js?01_38"></script>
		
		<!--插件-->
		<script type="text/javascript" src="../common/js/vue.min.js?01_38"></script>
		<script type="text/javascript" src="../common/js/mui.min.js?01_38"></script>
		<script type="text/javascript" src="../common/js/jquery-validate.js?01_38"></script>
		
		<script type="text/javascript" src="../common/js/fastclick.js?01_38"></script>
		<script type="text/javascript" src="../common/js/common.js?01_38"></script>
		<script type="text/javascript" src="../common/js/main.js?01_38"></script>
		<script type="text/javascript" src="../common/js/app.js?01_38"></script>
		<script type="text/javascript" src="../common/js/my_common.js?01_38"></script>
		<style>
			.wrap_body .clear_1{ position: absolute; right: 10px; top: 0;}
		</style>
	</head>

	<body>
		<div id="app" class="wrap_body sms_verification" v-cloak>

			<div class="header f-16 fiex pad-b-10 pad-t-30  pad-r-10">
				<div class="back">
					<a onClick="back()" class="bk"></a>
				</div>
				<!--<div class="f-right fiex1 pad-r-20">
					<a @click="cli" href="javascript:;" class="bk red9">{{b_lg[1195]}}</a>
				</div>-->
			</div>
			<div class="content pad-l-5 pad-r-5 f-16 mag-t-90 pad-b-20">
				<p class="center f-24">{{b_lg[1200]}}</p>
				<div class="mag-t-45 pad-b-20 pr fiex bor"><div style="white-space: nowrap;" class="mag-r-10">{{b_lg[1186]}}</div><div class="fiex1"><input style="width: 100%;" v-model="forms.code" type="number" :placeholder="b_lg[1201]" class="required" data-valid="isNonEmpty" :data-error="global_lange[1187]" /></div></div>
				<div class="mag-t-20 pad-b-20 pr fiex bor"><div style="white-space: nowrap;" class="mag-r-10">{{b_lg[1016]}}</div><div class="fiex1"><input style="width: 100%;" v-model="forms.password" type="password" :placeholder="b_lg[1154]" class="required "  data-valid="newpassword" id="pwd" :data-error="global_lange[1189]" /></div><div v-if="forms.password.length!=0" class="clear_1 pa delete_msg" @click="clear(1)"></div></div>
				<div class="mag-t-20 pad-b-20 pr fiex bor"><div style="white-space: nowrap;" class="mag-r-10">{{b_lg[1155]}}</div><div class="fiex1"><input style="width: 100%;" v-model="password_2" type="password" :placeholder="b_lg[1155]" class="required "  data-matchID="pwd" data-valid="matchPwd" :data-error="global_lange[1014]" /></div><div v-if="password_2.length!=0" class="clear_1 pa delete_msg" @click="clear(2)"></div></div>
			</div>
			<div class="error-box  red center mag-b-45" style="height:10px;" id="errortip">
				<span class="mag-r-5 "></span>
			</div>
			<!--下一步按钮-->
			<div class="center mag-t-35">
				<a @click="cli" href="javascript:;" class="bg-red9 fff get_code pad-l-80 pad-r-80 pad-t-15 pad-b-15 btn" style="border-radius:30px;">{{b_lg[1017]}}</a>
			</div>
		</div>
		<script>
			window.onscroll = function() {
				var h = document.documentElement.scrollTop;
				if(h > 1) {
					header.style.backgroundColor = "#fd5749";
				} else {
					header.style.backgroundColor = "transparent";
				}
			}

			function fun1() {
				if(isAPP) {
					var close_table = plus.webview.currentWebview().opener()
					close_table.evalJS('app.cli_success()')
				}
				//表单验证
				$('#app').validate({
					selectID: "#errortip" //指定弹出位置
				});
				var app = new Vue({
					el: '#app',
					data: {
						b_lg: JSON.parse(getItem('Langues')), //语言包
						forms: {
							prefix: "",
							code: "", //验证码
							username: "",
							password: ""
						},
						password_2: ""
					},
					methods: {
						clear:function(e){
							if(e==1){
								app.forms.password = ""
							}else if(e==2){
								app.password_2=""
							}
						},
						cli: function() {
							if($("#app").validate('submitValidate')) {
								app.forms.prefix = getItem("phone_prefix");
								app.forms.username = getItem("phone_num");

								common_ajax("1", app.forms, "&a=put_forgot_password", function(h) {
									if(h.status == 1) {
										if(isAPP) {
											mui.alert(app.b_lg['1198'], app.b_lg['1320'], "OK", function() {
												var ws = plus.webview.currentWebview()
												var ws2 = plus.webview.currentWebview().opener()
												plus.webview.close(ws2.id)
												plus.webview.close(ws.id)
											},"div")
										}
									} else {
										mui.toast(h.msg);
									}
								})
							}

						}
					}
				})
			}
		</script>
	</body>

</html>
